Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(EAI-375): Ingest snooty docs facets and meta #558

Closed
wants to merge 5 commits into from
Closed

Conversation

mongodben
Copy link
Collaborator

@mongodben mongodben commented Nov 14, 2024

Jira: https://jira.mongodb.org/browse/EAI-375

Changes

  • Ingest Snooty docs meta and facets fields as Page.metadata
  • Add chunking concurrency

Notes

Experiment Results

Initial experiment

Experiment compares using the ingestion pipeline with the new snooty metadata to the previous baseline. The results can be found here: mongodb-chatbot-retrieval/experiments/mongodb-chatbot-retrieval-snooty-metadata

The results actually show a very slight decrease in search quality as a result of these changes:

  • BinaryNDCG@5 goes from 33.20% -> 33.05% (-0.15%)
  • F1@5 goes from 23.33% -> 22.88% (-0.45%)

Follow up experiment

After upgrading embedding model and preprocessor. Even worse results. Can be seen here in Braintrust.

BinaryNDCG@5 goes from 51.77% -> 46.93%

Next Steps

Based on the results, I think we should not ingest and chunk this metadata. Instead, we should ingest it so it's present in the pages collection, but doesn't get included in the embedded_content. Will create follow-up PR for that.

@mongodben mongodben marked this pull request as draft November 14, 2024 14:44
@mongodben mongodben marked this pull request as ready for review November 15, 2024 14:49
@mongodben mongodben added the DO NOT MERGE Not yet ready for merge label Nov 15, 2024
const facetAndMetaNodes = findAll(
node,
({ name }) => name === "facet" || name === "meta"
) as (SnootyFacetNode | SnootyMetaNode)[];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for now. Longer term if we plan to maintain this Snooty AST glue code then it might be nice to move to Zod parsing for these instead of type casts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE Not yet ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants